#include "StarEntry.h"
#include <libnova.h>

StarEntry::StarEntry(unsigned int index, unsigned long numid, 
	    double epoch, double ra, double dec, double cpmRA, double cpmDE,
	    double mag, QString sname)
{
  //struct ln_equ_posn pos_from, pos_to;
  //double jd2000=2451545.0;
  //double jdnow=ln_get_julian_from_sys();
  indexcatalog=index;
  numidcatalog=numid;
  raCATALOG=ra;
  decCATALOG=dec;
  vmag=mag;
  name=sname;
  //switch (epoch) {
  //  case Catalog::B1900 :
  //    break;
  //  default:
      raJ2000=ra;
      decJ2000=dec;
  //    break;
  //}
  //pos_from.ra=raJ2000;
  //pos_from.dec=decJ2000;
  //ln_get_equ_prec2(&pos_from, jd2000, jdnow, &pos_to);
  //raJNOW=pos_to.ra;
  //decJNOW=pos_to.dec;
  pmRA = cpmRA;
  pmDE = cpmDE;
  htmid=cc_radec2ID(raJ2000, decJ2000, HTM_LENGTH);
}
